<template>
   <div class="user-edit">
    <el-dialog :modelValue="editVisible" @update:modeValue=('update:editVisible',$event) title="添加商品">
      <el-form :model="form" label-width="120px">
        <el-form-item label="商品名称">
          <el-input v-model="form.name" />
        </el-form-item>
        <el-form-item label="请输入商品名称">
          <el-select v-model="form.region" placeholder="商品类型">
            <el-option label="电器" value="shanghai" />
            <el-option label="衣物" value="beijing" />
          </el-select>
        </el-form-item>
        <el-form-item label="添加时间">
          <el-col :span="11">
            <el-date-picker
              v-model="form.date1"
              type="date"
              placeholder="Pick a date"
              style="width: 100%"
            />
          </el-col>  
          <el-col :span="2" class="text-center">
            <span class="text-gray-500">-</span>
          </el-col>
          <el-col :span="11">
            <el-time-picker
              v-model="form.date2"
              placeholder="Pick a time"
              style="width: 100%"
            />
          </el-col>
        </el-form-item>
        <el-form-item label="发布">
          <el-switch v-model="form.delivery" />
        </el-form-item>
        <el-form-item label="标签">
          <el-checkbox-group v-model="form.type">
            <el-checkbox label="便宜" name="type" />
            <el-checkbox label="质量" name="type" />
            <el-checkbox label="美观" name="type" />
            <el-checkbox label="快乐" name="type" />
          </el-checkbox-group>
        </el-form-item>
        <el-form-item label="资源">
          <el-radio-group v-model="form.resource">
            <el-radio label="Sponsor" />
            <el-radio label="Venue" />
          </el-radio-group>
        </el-form-item>
        <el-form-item label="详细信息">
          <el-input v-model="form.desc" type="textarea" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">提交</el-button>
          <el-button>返回</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
   </div>
</template>
<script>
  export default{
    name:"UserEdit",
    data(){
      return {
        user:{},
      }
    },
    props:{
      editVisible:Boolean
    },
    emits:["update:editVisible"]

   }
</script>
